package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Objects;

/**
 * @author: qiyr
 * @date: 2022/6/28 14:48
 * @description: 场外债券债券交易杠杆实体类
 */
@Data
@Entity
@Table(name = "t_reg_rpt_interotc_a11")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RegRptInterOtcA11.PK.class)
public class RegRptInterOtcA11 {

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @Column(name = "submit_org_name")
    private String submitOrgName;

    @Column(name = "submit_term")
    private String submitTerm;

    @Column(name = "submit_time")
    private String submitTime;

    @Id
    @Column(name = "row_id")
    private Integer rowId;

    /**
     * 业务类型
     */
    @Column(name = "ywlx")
    private String ywlx;

    /**
     * 业务类型代码
     */
    @Column(name = "ywlx_dm")
    private String ywlxDm;

    /**
     * 投于债券的自有资金配额
     */
    @Column(name = "zq_zyzj")
    private Double zqZyzj;

    /**
     * 机构净资产
     */
    @Column(name = "jgjzc")
    private Double jgjzc;

    /**
     * 债券正回购资金余额
     */
    @Column(name = "zqzhg_zjye")
    private Double zqzhgZjye;

    /**
     * 债券逆回购资金余额
     */
    @Column(name = "zqnhg_zjye")
    private Double zqnhgZjye;

    /**
     * 债券券面金额
     */
    @Column(name = "zq_qmje")
    private Double zqQmje;

    /**
     * 债券公允价值
     */
    @Column(name = "zq_gyjz")
    private Double zqGyjz;

    /**
     * 债券账面价值
     */
    @Column(name = "zq_zmjz")
    private Double zqZmjz;

    /**
     * 报价回购正回购资金余额
     */
    @Column(name = "zhgzjye")
    private Double zhgzjye;

    /**
     * 报价回购逆回购资金余额
     */
    @Column(name = "nhgzjye")
    private Double nhgzjye;

    public RegRptInterOtcA11() {
    }

    public RegRptInterOtcA11(BigInteger mainId, String submitOrgName, String submitTerm, String submitTime,
                             Integer rowId, String ywlx, String ywlxDm, Double zqZyzj, Double jgjzc,
                             Double zqzhgZjye, Double zqnhgZjye, Double zqQmje, Double zqGyjz, Double zqZmjz,
                             Double zhgzjye , Double nhgzjye) {
        this.mainId = mainId;
        this.submitOrgName = submitOrgName;
        this.submitTerm = submitTerm;
        this.submitTime = submitTime;
        this.rowId = rowId;
        this.ywlx = ywlx;
        this.ywlxDm = ywlxDm;
        this.zqZyzj = zqZyzj;
        this.jgjzc = jgjzc;
        this.zqzhgZjye = zqzhgZjye;
        this.zqnhgZjye = zqnhgZjye;
        this.zqQmje = zqQmje;
        this.zqGyjz = zqGyjz;
        this.zqZmjz = zqZmjz;
        this.zhgzjye = zhgzjye;
        this.nhgzjye = nhgzjye;
    }

    public static class PK implements Serializable {
        private BigInteger mainId;
        private Integer rowId;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public Integer getRowId() {
            return rowId;
        }

        public void setRowId(Integer rowId) {
            this.rowId = rowId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(rowId, pk.rowId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, rowId);
        }
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public String getSubmitOrgName() {
        return submitOrgName;
    }

    public void setSubmitOrgName(String submitOrgName) {
        this.submitOrgName = submitOrgName;
    }

    public String getSubmitTerm() {
        return submitTerm;
    }

    public void setSubmitTerm(String submitTerm) {
        this.submitTerm = submitTerm;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public String getYwlx() {
        return ywlx;
    }

    public void setYwlx(String ywlx) {
        this.ywlx = ywlx;
    }

    public String getYwlxDm() {
        return ywlxDm;
    }

    public void setYwlxDm(String ywlxDm) {
        this.ywlxDm = ywlxDm;
    }

    public Double getZqZyzj() {
        return zqZyzj;
    }

    public void setZqZyzj(Double zqZyzj) {
        this.zqZyzj = zqZyzj;
    }

    public Double getJgjzc() {
        return jgjzc;
    }

    public void setJgjzc(Double jgjzc) {
        this.jgjzc = jgjzc;
    }

    public Double getZqzhgZjye() {
        return zqzhgZjye;
    }

    public void setZqzhgZjye(Double zqzhgZjye) {
        this.zqzhgZjye = zqzhgZjye;
    }

    public Double getZqnhgZjye() {
        return zqnhgZjye;
    }

    public void setZqnhgZjye(Double zqnhgZjye) {
        this.zqnhgZjye = zqnhgZjye;
    }

    public Double getZqQmje() {
        return zqQmje;
    }

    public void setZqQmje(Double zqQmje) {
        this.zqQmje = zqQmje;
    }

    public Double getZqGyjz() {
        return zqGyjz;
    }

    public void setZqGyjz(Double zqGyjz) {
        this.zqGyjz = zqGyjz;
    }

    public Double getZqZmjz() {
        return zqZmjz;
    }

    public void setZqZmjz(Double zqZmjz) {
        this.zqZmjz = zqZmjz;
    }

    public Double getZhgzjye() {
        return zhgzjye;
    }

    public void setZhgzjye(Double zhgzjye) {
        this.zhgzjye = zhgzjye;
    }

    public Double getNhgzjye() {
        return nhgzjye;
    }

    public void setNhgzjye(Double nhgzjye) {
        this.nhgzjye = nhgzjye;
    }
}
